package com.warmheart.impl.sys;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.warmheart.base.service.impl.BaseService;
import com.warmheart.dao.sys.SysAreaBaseDao;
import com.warmheart.entity.sys.SysAreaBase;
import com.warmheart.model.AreaTreeModel;
import com.warmheart.service.sys.ISysAreaBaseService;

/**
 * 
 * @ClassName: SysAreaBaseService
 * @Description: 区域Service，对应表名称为tb_sys_area_base
 * 温馨提示：对外提供的接口，原则上这里只写自定义方法
 * @author ZhangJianyang
 * @date 2025-06-16 09:37:02
 *
 */
@Service(value = "sysAreaBaseService")
public class SysAreaBaseService extends BaseService<SysAreaBase> implements ISysAreaBaseService {

    @Autowired
    private SysAreaBaseDao sysAreaBaseDao;

    @Override
    public SysAreaBaseDao getDao() {
        return this.sysAreaBaseDao;
    }
    
    /**
     * 
     * @Title: getTreeModelList
     * @Description: 获取区域树形结构
     * @author ZhangJianyang
     * @param sysAreaBase
     * @return
     */
    @Override
    public List<AreaTreeModel> getTreeModelList(SysAreaBase sysAreaBase) {
        return this.getDao().selectListCustom(sysAreaBase, "getTreeModelList");
    }

    /**
     * 
     * @Title: getProvCodes
     * @Description: 获取省CODE
     * @author ZhangJianyang
     * @param cityCodes
     * @return
     */
    @Override
    public List<String> getProvCodes(List<String> cityCodes) {
        return this.getDao().selectListCustom(cityCodes, "getProvCodes");
    }
}